package biz.core.service.impl;

import java.util.List;

import biz.core.dao.AuctionDao;
import biz.core.domain.Auction;
import biz.core.exception.DAOException;
import biz.core.exception.ServiceException;
import biz.core.service.AuctionService;

public class AuctionServiceImpl implements AuctionService{
	private AuctionDao auctionDao;

	public List<Auction> findAll() throws ServiceException {
		try {
			return auctionDao.findAll();
		} catch (DAOException e) {
			throw new ServiceException(e.getMessage(), e);
		}
	}
	public List<Auction> findByName(String name) throws ServiceException {
		try {
			return auctionDao.findByName(name);
		} catch (DAOException e) {
			throw new ServiceException(e.getMessage(), e);
		}
	}

	public AuctionDao getAuctionDao() {
		return auctionDao;
	}

	public void setAuctionDao(AuctionDao auctionDao) {
		this.auctionDao = auctionDao;
	}


	
	
	

}
